package com.leyou.item.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.leyou.item.dto.*;
import com.leyou.item.entity.Spu;
import com.leyou.item.entity.SpuDetail;

import java.util.List;

public interface GoodsService extends IService<Spu> {

    //分页查询Spu
    PageSpuDTO goodsPage(Long brandId, Long categoryId, Long id, Long page, Long rows, Boolean saleable);

    //新增商品
    void insertGood(SpuDTO spuDTO);

    //修改商品
    void updateGoog(SpuDTO spuDTO);

    //根据id集合查询Sku集合
    List<SkuDTO> selectSkusByIds(List<Long> ids);

    //根据id查询Sku集合
    List<SkuDTO> selectSkusById(Long sid);

    //根据id查询商品详情
    SpuDetailDTO selectSpuDetailById(Long id);

    //根据spuid查询spu的所有规格参数值
    List<SpecParamDTO> selectSpecValueById(Long id, Boolean searching);

    //修改商品上下架
    void updateSpuSaleableById(Long id, Boolean saleable);

    //根据id查询spu及sku、spuDetail
    SpuDTO selectSpuSkuSpudetailById(Long id);

    //根据id查询商品
    SpuDTO selectSpuById(Long id);
}
